﻿using ConfExpert.Forms.Base;
using ConfExpert.Utility;
using DevExpress.Utils;
using DevExpress.XtraGrid.Columns;
using DevExpress.XtraGrid.Views.Grid;
using Extensions;
using System;
using System.Data;
using System.Drawing;
using System.Windows.Forms;

namespace ConfExpert.Forms
{
    public partial class AdhocQuery : XForm
    { 
        //public AdhocQuery(AdHocQueries type)
        //{
        //    InitializeComponent();
        //    this.Text = txtInfo.Caption = "Raporlar";
        //    Type = type;

        //    gvMaster.OptionsView.AllowCellMerge = true;
        //    gvMaster.CellMerge += new DevExpress.XtraGrid.Views.Grid.CellMergeEventHandler(gv_CellMerge);

        //    gvMaster.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(gvMaster_FocusedRowChanged);

        //    //switch (type)
        //    //{
                
        //    //}

        //    foreach (GridColumn col in gvMaster.Columns)
        //        col.OptionsFilter.FilterPopupMode = FilterPopupMode.CheckedList;

        //    foreach (GridColumn col in gvDetail.Columns)
        //        col.OptionsFilter.FilterPopupMode = FilterPopupMode.CheckedList;

        //}
         
        void gvMaster_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            gvDetail.BestFitColumns();
        } 

        private void AdhocQuery_Load(object sender, System.EventArgs e)
        {
            splitter.SplitterPosition = splitter.Width / 2;
        } 
 
    }
}